﻿using System;
using System.Collections.Generic;
using System.Linq;
using FarseerGames.FarseerPhysics;
using FarseerGames.FarseerPhysics.Collisions;


namespace UnitLibrary.GameObjects.Physics
{
    public class PhyGeom
    {
        public string Name = "Brutal";
        public bool IsSensor = false;
        public bool InSimulation = true;
        public CollisionCategory CollidesWith = CollisionCategory.All;
        public CollisionCategory CollisionCategories = CollisionCategory.All;
        public bool CollisionResponseEnabled = true;
        public float FrictionCoefficient = 0f;
        public float RestitutionCoefficient = 0f;
        public int CollisionGroup = 0;
        public bool CollisionEnabled = true;

        public void CopyValues(ref Geom geom)
        {
            geom.IsSensor = this.IsSensor;
            geom.InSimulation = this.InSimulation;
            geom.CollidesWith = this.CollidesWith;
            geom.CollisionCategories = this.CollisionCategories;
            geom.CollisionResponseEnabled = this.CollisionResponseEnabled;
            geom.FrictionCoefficient = this.FrictionCoefficient;
            geom.RestitutionCoefficient = this.FrictionCoefficient;
            geom.CollisionGroup = this.CollisionGroup;
            geom.CollisionEnabled = this.CollisionEnabled;
        }

        public void CopyValues(ref PhyGeom geom)
        {
            geom.IsSensor = this.IsSensor;
            geom.InSimulation = this.InSimulation;
            geom.CollidesWith = this.CollidesWith;
            geom.CollisionCategories = this.CollisionCategories;
            geom.CollisionResponseEnabled = this.CollisionResponseEnabled;
            geom.FrictionCoefficient = this.FrictionCoefficient;
            geom.RestitutionCoefficient = this.FrictionCoefficient;
            geom.CollisionGroup = this.CollisionGroup;
            geom.CollisionEnabled = this.CollisionEnabled;
        }
    }
}
